package org.ws.lifebacklog.event;

import android.content.Intent;

public class ExceptionEvent extends GenericEvent {
	public final static String EVENT_TYPE = "ExceptionEvent";
	private final static String KEY_ERROR_CODE = "KEY_ERROR_CODE";

	public final static int ERR_SQL_UPGRADE = 44;

	public ExceptionEvent(int errorCode) {
		super();
		putExtra(KEY_EVENT_TYPE, EVENT_TYPE);
		putExtra(KEY_ERROR_CODE, errorCode);
	}

	public ExceptionEvent(Intent i) {
		super(i);
	}

	public int getErrorCode() {
		return getIntExtra(KEY_ERROR_CODE, 0);
	}

	/** {@inheritDoc} */
	@Override
	public void execute() {
		handleException(new ExceptionEvent(this));
	}

	/**
	 * @param exceptionEvent
	 */
	private void handleException(ExceptionEvent exceptionEvent) {
	}

}
